//控件设置的基础配置

import bussinessControl from './bussiness-setup';
import contractControl from './contract-setup';
import invoiceControl from './invoice-setup';
import baseControl from './base-setup';
import buyControl from './buy-setup';
import orderControl from './order-setup';

//tab配置
export interface TtabItem {
  tabName: string; //tab的名称
  code: string; //tab的唯一code
  componentCodeList: string[]; //tab下的控件code列表，根据这个渲染tab下的控件
}
export const tabList: TtabItem[] = [
  {
    tabName: '基础控件',
    code: 'baseComponent',
    componentCodeList: [
      'TEXT',
      'TEXT_AREA',
      'TEXT_NUMBER',
      'TEXT_MONEY',
      'DATE',
      'DATE_RANGE',
      'SELECT',
      'RADIO',
      'CHECK_BOX',
      'TABLE',
      'FILE',
    ],
  },
  {
    tabName: '业务控件',
    code: 'businessComponent',
    componentCodeList: [
      'TEXT',
      'NUMBER-UNIVERSAL',
      'TEXT_AREA',
      'DELIVERY_REQUIREMENTS_BC',
      'TABLE',
      'DEPARTMENT',
      'POST',
      'CLIENT',
      'CLIENT_NUMBER',
      'CONTACT_NAME',
      'ADDRESS',
      'COMPANY',
      'BUSINESS_COPYING',
      'BUSINESS_MANAGER',
      'AGENCY_DATE',
      'END_DATE',
      'CONTRACT_TOTAL',
      'CONTRACT_CONTENT',
      'CONTRACT_PAYMENT',
      'INVOICE_TYPE',
      'INVOICE_RATE',
      'COMPANY_TITLE',
      'TAXPAYER_IDENTIFICATION_NUMBER',
      'ACCOUNT_BANK',
      'UNIT_ADDRESS',
      'INVOICE_REMARK',
      'RECEIVING_ACCOUNT',
      'PAYMENT_METHOD',
      'PRODUCT_DETAIL',
      'PAYMENT_DETAILS',
      'CONTRACT_SELECT',
      'CREATED_DY',
      'APPLY_DEPT',
      'APPLY_DATE',
      'APPLY_CAUSE',
      'APPLY_DETAILED',
      'SUOOLIER-NAME',
      'SUOOLIER-NUMBER',
      'CONTACT-NUMBER',
      'E-MAIL',
      'CONTACT-ADDRESS',
      'BUYER',
      'BUY-PHONE',
      'BUY-DETAILED',
      'BUY-TOTAL-AMOUNT',
      'BUY-PLAN-DETAILS',
    ],
  },
];

//控件配置
export interface TcomponentItem {
  [x: string]: string;
  componentName: string; //控件的名称
  componentType: string; //控件的类型
  code: string; //控件的唯一code
  showFieldList: any; //该控件可修改的props字段
  icon: string; //控件的icon
  props: any; //对象 props的默认值
  type: string;
}
export const componentList: any[] = [
  ...baseControl,
  ...bussinessControl,
  ...contractControl,
  ...invoiceControl,
  ...buyControl,
  ...orderControl,
];
